home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / earcd / comm / ums / pint.lha / UMS / Rexx / UUDecode.pint < prev   
Text File  |  1997-03-04  |  2KB  |  83 lines

  1. /*
  2.  
  3.    $VER: UUDecode.pint 1.0 (27.8.95)
  4.  
  5.    Author:
  6.     Matthias Scheler (tron@lyssa.owl.de)
  7.  
  8.    Updated for PINT (22.2.97):
  9.     Magnus Heino (nd95mho@Student.HGS.SE)
  10.  
  11.    Function:
  12.     uudecodes a file, even if it is distributed in several messages
  13.  
  14.    History:
  15.     0.1   internal version
  16.     0.2   internal version
  17.     0.3   internal version
  18.     0.4   first public release of IntuiNews 1.3 Beta 3
  19.     0.5   adapted to IntuiNews 1.3 Beta 5
  20.     0.6   cosmetic changes
  21.     0.7   removed SAY calls
  22.     0.8   decided to get rid of this strange AMOK style header and
  23.           went back to my good old standard
  24.     0.9   fixed version string
  25.     0.10  fixed header
  26.     1.0   released with IntuiNews 1.3
  27.  
  28.    Requires:
  29.     "uudecode" in command path of ARexx
  30.  
  31.    Example for "ums.config":
  32.     ( PINT.Rexx
  33.     ...
  34.         "(Article|Message)Window F2 UUDecode.pint T:\n"
  35.     ...
  36.     )
  37.  
  38. */
  39.  
  40. PARSE ARG Directory
  41.  
  42. /* get PINT's message number */
  43.  
  44. OPTIONS RESULTS
  45.  
  46. /* If Message Window is active ... */
  47.  
  48. STATUS
  49. IF RESULT="MESSAGE" THEN
  50.  DO
  51.  
  52. /* ... save current message. */
  53.  
  54.   GETMSGNUM
  55.   MsgList=RESULT
  56.  END
  57. ELSE
  58.  
  59. /* If Article Window is active ... */
  60.  
  61.  IF RESULT="ARTICLE" THEN
  62.   DO
  63.  
  64. /* ... save all selected messages, useful for splitted messages. */
  65.  
  66.    GETSELMSGNUMS
  67.    IF RESULT="RESULT" THEN EXIT 5
  68.    MsgList=RESULT
  69.   END
  70.  
  71. /* Exit otherwise. */
  72.  
  73.  ELSE EXIT 5
  74.  
  75. /* start uudecode reading from a pipe ... */
  76.  
  77. CALL PRAGMA('Directory',Directory)
  78. SHELL COMMAND 'Run >NIL: uudecode PIPE:UUDecode'
  79.  
  80. /* ... and save message bodies to this pipe. */
  81.  
  82. 'SAVEMSGBODY' MsgList 'TO PIPE:UUDecode'
  83.